// .comment-form-wrap {
// }
.comment-form-body {
	display: flex;
	align-items: flex-start;
}
.comment-form-avatar {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	margin-right: 16px;
	img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		border-radius: 50%;
		vertical-align: top;
	}
}
.comment-form-content {
	flex-grow: 1;
	min-width: 0;
}
.comment-form-input-group {
	display: flex;
	align-items: center;
	margin-bottom: 12px;
}
.comment-form-input {
	padding: 8px 12px;
	font-size: 14px;
	color: var(--jj-comment-form-input);
	background-color: var(--jj-comment-form-input-bg);
	border: 1px solid var(--jj-comment-form-input-border);
	border-radius: 4px;
	outline: none;
	transition: all 0.3s;
	&::placeholder {
		color: var(--jj-comment-form-input-placeholder);
	}
	&:focus {
		border-color: var(--jj-comment-form-input-border-focus);
		background-color: var(--jj-comment-form-input-bg-focus);
	}
}
.comment-form-input {
	width: 1px;
	flex-grow: 1;
	line-height: 1;
	height: 36px;
	& + & {
		margin-left: 8px;
	}
}
.comment-form-combination {
	position: relative;
	background-color: var(--jj-comment-form-input-bg);
	border: 1px solid var(--jj-comment-form-input-border);
	border-radius: 4px;
	padding: 8px 12px 44px;
	transition: all 0.3s;
	&:hover {
		background-color: #e4e6eb;
	}
}
.comment-form-combination.focused {
	border-color: var(--jj-comment-form-input-border-focus);
	background-color: var(--jj-comment-form-input-bg-focus);
	.comment-form-textarea {
		min-height: 106px;
		max-height: 300px;
	}
}
// .comment-form-textarea-wrap {
// 	margin-bottom: 8px;
// }
.comment-form-textarea {
	display: block;
	width: 100%;
	font-size: 14px;
	color: var(--jj-comment-form-input);
	min-height: 44px;
	outline: none;
	border: none;
	background-color: transparent;
	resize: none;
	transition: all 0.3s;
	&::placeholder {
		color: var(--jj-comment-form-input-placeholder);
	}
}
.comment-form-footer {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 6px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.comment-form-btn {
	height: 32px;
	padding: 0 16px;
	font-size: 14px;
	color: var(--jj-comment-form-btn);
	border: none;
	border-radius: 4px;
	outline: none;
	cursor: pointer;
}
.comment-form-submit {
	background-color: var(--jj-comment-form-submit-bg);
}
.comment-form-cancel {
	background-color: var(--jj-comment-form-cancel-bg);
}
.comment-form {
	//每个表单元素的验证样式
	//失败
	input,
	textarea {
		&[required]:not(:placeholder-shown) {
			border-color: var(--jj-comment-form-input-border-error);
		}
	}

	//成功
	input,
	textarea {
		&[required]:valid {
			border-color: var(--jj-comment-form-input-border-focus);
		}
	}

	//整个表单验证通过
	&:valid {
		.comment-form-submit {
			background-color: var(--jj-comment-form-submit-bg-success);
			&:hover {
				background-color: var(--jj-comment-form-submit-bg-success-hover);
			}
			&:active {
				opacity: 0.7;
			}
		}
	}
}

@media screen and (max-width: 600px) {
	.comment-form-avatar {
		display: none;
	}
}
@media screen and (max-width: 480px) {
	.comment-form-input-group {
		flex-wrap: wrap;
	}
	.comment-form-input {
		width: 100%;
		& + & {
			margin-left: 0;
			margin-top: 12px;
		}
	}
	.comment-form-btn {
		height: 30px;
		padding: 0 12px;
	}
}
